package com.lecloud.api.connect;

import java.util.Map;

import cn.edu.live.util.TimeUtil;

import com.alibaba.fastjson.JSONObject;
import com.lecloud.constant.Const;
import com.lecloud.model.PublicParam;
import com.lecloud.util.LeCloudVerify;
import com.lecloud.util.Sender;

/**
 * 直播活动流信息查询接口（ver=4.0）</br> 功能说明：用于第三方播放器获取直播活动的流信息。
 * 
 * @author zhagz
 * 
 */
public class QueryActivityStreamInfo {
	private static final String queryActivityStreamInfo_method = "lecloud.cloudlive.activity.search";
	private static final String queryActivityStreamInfo_ver = "4.0";

	public JSONObject queryActivityStreamInfo(String activityId) {
		Map<String, String> map = PublicParam.getPublicParamMap(queryActivityStreamInfo_method,
				queryActivityStreamInfo_ver, Const.userid, TimeUtil.currentTime());
		map.put("activityId", activityId);

		String sign = LeCloudVerify.getSign(map);
		map.put("sign", sign);
		JSONObject js = Sender.get(Const.common_url, map);

		return js;
	}
}
